<%@page import="com.bosch.in.rtp1.ept.constant.ReleasedHoldParameter"%>
<%@page import="java.util.Calendar"%>
<%@ page import="com.bosch.in.jfree.chart.JfreeChartIntf;"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>

<link href="css/imageZoom.css" type="text/css" rel="stylesheet"></link>
<script type="text/javascript" src="js/tipmessage.js"></script>
<script type="text/javascript" src="js/relHldDiagram.js"></script>
<form name="searchForm" action="releasedHoldDiagram.do?cmd=releasedHoldDiagram" method="POST">
<div
	id="toolTipForChart"
	style="display:none;
	position:absolute;
	border-style: solid;
	border: '1px';
	background-color: white;
	z-index:1003;
	padding: 5px;">
</div>
<div class="ui-jqgrid ui-widget  ui-corner-all">
	<div class = "ui-jqgrid-view">
		<div class="ui-jqgrid-titlebar ui-widget-header ui-corner-top ui-helper-clearfix">
			<a id="minFilterButton" class="ui-jqgrid-titlebar-close HeaderButton" href="javascript:void(0)" style="right: 0px;">
				<span id="minButton" class="ui-icon ui-icon-circle-triangle-n"></span>
			</a>
				<span class="ui-jqgrid-title">Filter Criteria</span>
		</div>
	</div>
</div>
<table id="filterCriteria" width="100%" border="0" class="box">
	<tbody>
		<tr>
			<td>&nbsp;
				<input id="hiddenYear" 	type="hidden" value="<%=request.getAttribute(ReleasedHoldParameter.DIAGRAM_YEAR_HIDDEN_PARAMETER)%>">
				<input id="hiddenType" 	type="hidden" value="<%=request.getAttribute(ReleasedHoldParameter.DIAGRAM_TYPE_HIDDEN_PARAMETER)%>">
			</td>
		</tr>
		<tr>	
			<td width="200px" nowrap="nowrap"> 
				<span style="display:inline-block;font-size: 11px;margin: 5px;">Year</span>
				<span style="display:inline-block;font-size: 11px;margin: 5px;">:</span>
				<html:select  name="releasedHoldDiagram" property="selectedYear" styleClass="DropDownTextBox" style="width:120px">
						<html:optionsCollection name="releasedHoldDiagram" property="years" value="value" label="value"/>
				</html:select>
			</td>		
			<td width="200px" nowrap="nowrap"> 
				<span style="display:inline-block;font-size: 11px;margin: 5px;">Type</span>
				<span style="display:inline-block;font-size: 11px;margin: 5px;">:</span>
				<html:select  name="releasedHoldDiagram" property="selectedType" styleClass="DropDownTextBox" style="width:120px">
						<html:optionsCollection name="releasedHoldDiagram" property="diagramTypes" value="value" label="display"/>
				</html:select>
			</td>
			<td width="100px"> 
				<a class="bosch_button_style" href="javascript:loadRelHldGraph();">Show</a>
			</td>
			<td > 
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>		
	</tbody>
</table>
</form>
<br/>
<table width="100%" border="0" class="box">
	<tbody>
		<tr>
			
			<td align="center"> 
			<%
				String fileName = (String) request.getAttribute(ReleasedHoldParameter.REL_HLD_DIAGRAM_NAME.toString());
				String imgMapFile = fileName + JfreeChartIntf.IMAGEMAP_SUFFIX;
				out.write((String)request.getAttribute(imgMapFile));
			%>
				<img id="Avg" alt="Average" src="servlet/DisplayChart?filename=<%=fileName%>&timestamp=<%=Calendar.getInstance().getTimeInMillis()%>"
					usemap="#<%=fileName%>" border="0" align="middle">
			</td>
		</tr>
		<tr>			
			<td align="center">
				<a class="bosch_first_button_style" href="javascript:exportRelHldDiagram();">Export</a>
			</td>
		</tr>	
	</tbody>
</table>
<br>
